package string;

public class StringBuilderDemo {
    public static void main(String[] args) {
        String str = "黄总别睡了";
        StringBuilder builder = new StringBuilder(str);

        builder.append(",起来学Java");
        System.out.println(builder);

        builder.replace(5,13,",该拯救世界了");
        System.out.println(builder);

        builder.delete(2,3);
        System.out.println(builder);

        builder.insert(5,"我");
        System.out.println(builder);







        /*
        StringBuilder builder = new StringBuilder();
        StringBuilder builder1 = new StringBuilder("abc");

        String str = "abc";
        StringBuilder builder2 = new StringBuilder(str);
        String str1 = builder2.toString();

         */
    }
}
